<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>热销商品</title>
<link rel="stylesheet" href="#(CONTEXT_PATH??)/static/lib/layui/css/layui.css">
<script src="#(CONTEXT_PATH??)/static/lib/echarts.min.js"></script>
<script src="#(CONTEXT_PATH??)/static/lib/layui/layui.js" charset="utf-8"></script> 
<script src="#(CONTEXT_PATH??)/static/js/jquery-1.12.0.min.js" charset="utf-8"></script>
</head>
<body>
	<div style="width:100%;min-height: 50px;">
	<form action="#(CONTEXT_PATH??)/report/dayIncome" method="post">
		<table style="margin:10px;">
			<tr>
				<td>
					开始时间
				</td>
				<td>
					<input type="text" id="startDate" value="#(startDate??)" name="startDate" class="layui-input"/>
				</td>
				<td>
					结束时间
				</td>
				<td>
					<input type="text" id="endDate" value="#(endDate??)" name="endDate" class="layui-input"/>
				</td>
				<td>
					<input value="搜索" class="layui-btn"  style="width:80px" type="submit">
				</td>
			</tr>
			
		</table>
	</form>
	</div>
	
	 <div id="main" style="width: 600px;height:400px;"></div>
	 <script>
	layui.use('laydate', function(){
	  var laydate = layui.laydate;
	  
	  //执行一个laydate实例
	  laydate.render({
	    elem: '#startDate' //指定元素
	  });
	//执行一个laydate实例
	  laydate.render({
	    elem: '#endDate' //指定元素
	  });
	});
	</script>
	 <script type="text/javascript">
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));

        // 指定图表的配置项和数据
        var option = {
            title: {
                text: '销售分析'
            },
            tooltip: {},
            legend: {
                data:['日收入']
            },
            xAxis: {
                data: [#for(c : cs) "#(c.NAME??)" #if(for.index!=(for.size-1)), #end #end]
            },
            yAxis: {},
            series: [{
                name: '收入',
                type: 'bar',
                data: [#for(c : cs) #(c.money??) #if(for.index!=(for.size-1)), #end #end]
            }]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart.setOption(option);
    </script>
</body>
</html>